package com.googlecode.lookie.explorer.internal;

import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeNode;

import com.googlecode.lookie.swing.tree.model.DeferredTreeNodeModel;
import com.googlecode.lookie.swing.tree.model.TreeNodeProvider;
import com.googlecode.lookie.swing.tree.navigation.Navigator;

public class FileSystemTreeNavigator
    extends Navigator
{

    private TreeNodeProvider provider;

    public FileSystemTreeNavigator( JTree tree, TreeNode root, TreeNodeProvider provider )
    {
        super( tree, root );
        this.provider = provider;
        init();
    }

    @Override
    protected DefaultTreeModel newTreeModel( TreeNode root )
    {
        return new DeferredTreeNodeModel( root, provider );
    }

}
